package com.asset.troubleticket.domain;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

@SuppressWarnings("serial")
@Table(name="tt_ticket")
@Entity
public class Ticket implements Serializable {

	private Integer id;
	private String title;
	private Date openTime;
	private Date closeTime;
	private Date lastUpdatedTime;
	private String description;
	private String note;
	private String feedback;
	private String info;
	private boolean flag;
	private Category categoryId;
	private Employee employeeId;
	private Contact contactId;
	private Status statusId;
	/**
	 * @return the id
	 */
	@Id
	@GeneratedValue(strategy = GenerationType.SEQUENCE ,generator="tt_ticket_id_seq")
	@SequenceGenerator(name="tt_ticket_id_seq",sequenceName="tt_ticket_id_seq",allocationSize=1)
	public Integer getId() {
		return id;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	/**
	 * @param id the id to set
	 */
	public void setId(Integer id) {
		this.id = id;
	}
	/**
	 * @return the title
	 */
	@Column(name="title")
	public String getTitle() {
		return title;
	}
	/**
	 * @param title the title to set
	 */
	public void setTittle(String title) {
		this.title = title;
	}
	/**
	 * @return the openTime
	 */
	@Column(name="open_time")
	public Date getOpenTime() {
		return openTime;
	}
	/**
	 * @param openTime the openTime to set
	 */
	public void setOpenTime(Date openTime) {
		this.openTime = openTime;
	}
	/**
	 * @return the closeTime
	 */
	@Column(name="close_time")
	public Date getCloseTime() {
		return closeTime;
	}
	/**
	 * @param closeTime the closeTime to set
	 */
	public void setCloseTime(Date closeTime) {
		this.closeTime = closeTime;
	}
	/**
	 * @return the lastUpdatedTime
	 */
	@Column(name="last_updated_time")
	public Date getLastUpdatedTime() {
		return lastUpdatedTime;
	}
	/**
	 * @param lastUpdatedTime the lastUpdatedTime to set
	 */
	public void setLastUpdatedTime(Date lastUpdatedTime) {
		this.lastUpdatedTime = lastUpdatedTime;
	}
	/**
	 * @return the description
	 */
	@Column(name="description")
	public String getDescription() {
		return description;
	}
	/**
	 * @param description the description to set
	 */
	public void setDescription(String description) {
		this.description = description;
	}
	/**
	 * @return the note
	 */
	@Column(name="note")
	public String getNote() {
		return note;
	}
	/**
	 * @param note the note to set
	 */
	public void setNote(String note) {
		this.note = note;
	}
	/**
	 * @return the feedback
	 */
	@Column(name="feedback")
	public String getFeedback() {
		return feedback;
	}
	/**
	 * @param feedback the feedback to set
	 */
	public void setFeedback(String feedback) {
		this.feedback = feedback;
	}
	/**
	 * @return the info
	 */
	@Column(name="info")
	public String getInfo() {
		return info;
	}
	/**
	 * @param info the info to set
	 */
	public void setInfo(String info) {
		this.info = info;
	}
	/**
	 * @return the flag
	 */
	@Column(name="flag")
	public boolean isFlag() {
		return flag;
	}
	/**
	 * @param flag the flag to set
	 */
	public void setFlag(boolean flag) {
		this.flag = flag;
	}
	/**
	 * @return the categoryId
	 */
	@ManyToOne
	@JoinColumn(name="category_id")
	public Category getCategoryId() {
		return categoryId;
	}
	/**
	 * @param categoryId the categoryId to set
	 */
	public void setCategoryId(Category categoryId) {
		this.categoryId = categoryId;
	}
	/**
	 * @return the employeeId
	 */
	@ManyToOne
	@JoinColumn(name="employee_id")
	public Employee getEmployeeId() {
		return employeeId;
	}
	/**
	 * @param employeeId the employeeId to set
	 */
	public void setEmployeeId(Employee employeeId) {
		this.employeeId = employeeId;
	}
	/**
	 * @return the contactId
	 */
	@ManyToOne
	@JoinColumn(name="contact_id")
	public Contact getContactId() {
		return contactId;
	}
	/**
	 * @param contactId the contactId to set
	 */
	public void setContactId(Contact contactId) {
		this.contactId = contactId;
	}
	/**
	 * @return the statusId
	 */
	@ManyToOne
	@JoinColumn(name="status_id")
	public Status getStatusId() {
		return statusId;
	}
	/**
	 * @param statusId the statusId to set
	 */
	public void setStatusId(Status statusId) {
		this.statusId = statusId;
	}
	
}
